{% extends "base.html" %}
{% block heads %}
<link href="/static/hl/styles/shCoreDefault.css" rel="stylesheet" type="text/css" />
{% if can_edit %}
  <link rel="alternate" type="application/x-wiki" href="/w/edit?page={{ page_title|uurlencode }}"/>
{% endif %}
{% endblock %}
{% block title %}{{ page_title|escape }} — {{ settings.title|escape }}{% endblock %}
{% block content %}
<ul id="tabs"{% if public_page %}{% else %} class="locked"{% endif %}>
  <li class="active"><a class="view" href="{{ page_title|pageurl }}">View</a></li>
  {% if can_edit %}<li><a href="/w/edit?page={{ page_title|uurlencode }}{% if revision %}&r={{ revision }}{% endif %}">Edit</a></li>{% endif %}
  <li><a href="/w/history?page={{ page_title|uurlencode }}">History</a></li>
</ul>
<div class="wtabs extl" id="pb">
  {% if page_exists %}
    {{ page_text }}
    {% if page_options.labels %}
      <p class="categories">{% if settings.labels_text %}{{ settings.labels_text }}{% else %}Labels{% endif %}: {% for label in page_options.labels %}{% if forloop.first %}{% else %}, {% endif %}<a class="int" href="{{ label|labelurl }}">{{ label|escape }}</a>{% endfor %}.</p>
    {% endif %}
  {% else %}
    <h1>{{ page_title }}</h1>
    <p>This page does not exist.</p>
    <form method="get" action="/w/edit">
      <input type="hidden" name="page" value="{{ page_title|escape }}"/>
      <input type="submit" value="Create it"/>
    </form>
  {% endif %}
</div>
{% endblock %}
{% block js %}
		<script type="text/javascript" src="/static/scripts/jquery-1.4.3.min.js"></script>
		<script src="/static/hl/scripts/shCore.js" type="text/javascript"></script>
		<script src="/static/hl/scripts/shAutoloader.js" type="text/javascript"></script>
		<script type="text/javascript" src="/static/hl.js"></script>
{% endblock %}
